<template>
   <div>
       
     <div class="box1">KGC新闻</div>
     <div style="display: flex;">

      <ul class="ul1">
         <li v-for="item in arr1" :key="item" style="width:16.6%">{{item}}</li>
     </ul>
     <img src="../assets/add.png" class="img1" width="10%" @click="dian" alt="">

     </div>
   </div>
</template>
<script>
export default {
   name: 'vnav',
   components: {
     
   },
   mixins: [],
   props: {
     
   },
   data() {
     return {
       arr1:[]
     }
   },
   computed: {
     
   },
   watch: {
     
   },
   mounted() {
     this.$axios({ 
        method: "get",
        url: "nav.json",
        
        params: {
       
        },
      })
        .then((res) => {
           
            // console.log(res);
            
            this.arr1 = res.data.result
            // console.log(this.arr);
        })
        .catch((err) => {
          console.log(err);
        });

   },
   methods: {
     dian(){
         this.$router.push('/channelManage')
     }
   }
};
</script>
<style lang='scss' scoped>
*{
    margin: 0;
    padding: 0;
}
.box1 {
    width: 100%;
    // height: 1.2rem;
    height: 50px;
    background-color:#d43d3d;
    color:#fff;
    line-height: 50px;
    text-align: center;
    font-weight: 900;
}

ul,li {
    list-style: none;
}
.ul1 {
   width: 100%;
      height: 40px;
      overflow-x: scroll;
      overflow-y: hidden;
      list-style-type: none;
      display: flex;
    
}
.ul1>li {
    width: 60px;
      height: 100%;
      flex: none;  /* 重点 */ 
      background: #F4F5F6;
      display: flex;
      justify-content: center;
      align-items: center;
}

</style>